import com.itheima.config.SpringConfig;
import com.itheima.domain.User;
import com.itheima.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringConfig.class)

public class App {
    @Autowired
    private UserService service;

    @Test
    public void findAllTest() {
        List<User> list = service.findAll();

        System.out.println(list);
    }


}
